package com.ccrfid.rmc6.service.personnel;

import com.ccrfid.rmc6.appconfig.exception.pojo.AppException;
import com.ccrfid.rmc6.entity.alarm.AlarmNotifyStrategyEntity;
import com.ccrfid.rmc6.entity.personnel.PersonnelEntity;
import com.ccrfid.rmc6.entity.personnel.PersonnelVitalSignsAlarmConfigEntity;
import com.ccrfid.rmc6.lbservice3.pojo.msg.MsgBloodPressure;
import com.ccrfid.rmc6.lbservice3.pojo.msg.MsgHeartRate;
import com.ccrfid.rmc6.lbservice3.pojo.msg.MsgTemperature;
import com.ccrfid.rmc6.repository.search.SearchCriteria;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

public interface PersonnelVitalSignAlarmService {

    /**
     * 人员心率预警
     * @param msgHeartRate
     * @param personnelEntity
     * @return
     */
    void heartRateAlarm(MsgHeartRate msgHeartRate, PersonnelEntity personnelEntity);

    /**
     * 人员血压报警
     * @param msgBloodPressure
     * @param personnelEntity
     * @return
     */
    void bloodPressureAlarm(MsgBloodPressure msgBloodPressure, PersonnelEntity personnelEntity);

    /**
     * 人员体温报警
     * @param msgTemperature
     * @param personnelEntity
     * @return
     */
    void temperatureAlarm(MsgTemperature msgTemperature, PersonnelEntity personnelEntity);


    /**
     * 获取人员生命体征数据
     * @param criteria
     * @param pageable
     * @return
     */
    Page<PersonnelVitalSignsAlarmConfigEntity> getPersonnelVitalSignAlarmConfig(SearchCriteria criteria, Pageable pageable);

    /**
     * 获取单个人员生命体征数据
     * @param personId
     * @return
     */
    PersonnelVitalSignsAlarmConfigEntity getSinglePersonnelVitalSignAlarmConfig(Long personId) throws AppException;

    /**
     * 新增人员生命体征预警的配置
     * @param personnelVitalSignsAlarmConfigEntity
     * @return
     * @throws AppException
     */
    PersonnelVitalSignsAlarmConfigEntity addPersonnelVitalSignAlarmConfig(PersonnelVitalSignsAlarmConfigEntity personnelVitalSignsAlarmConfigEntity) throws AppException;

    /**
     * 修改人员生命体征预警的配置
     * @param personnelVitalSignsAlarmConfigEntity
     * @return
     * @throws AppException
     */
    PersonnelVitalSignsAlarmConfigEntity updatePersonnelVitalSignAlarmConfig(PersonnelVitalSignsAlarmConfigEntity personnelVitalSignsAlarmConfigEntity) throws AppException;

    /**
     * 删除人员生命体征预警的配置
     * @param personnelId
     * @return
     * @throws AppException
     */
    Boolean deletePersonnelVitalSignAlarmConfig(List<Long> personnelId) throws AppException;


}
